CREATE TABLE xxl_job_info
(
    id                        serial
        primary key,
    job_group                 integer      NOT NULL,
    job_desc                  varchar(255) NOT NULL,
    add_time                  timestamp             DEFAULT NULL,
    update_time               timestamp             DEFAULT NULL,
    author                    varchar(64)           DEFAULT NULL,
    alarm_email               varchar(255)          DEFAULT NULL,
    schedule_type             varchar(50)  NOT NULL DEFAULT 'NONE',
    schedule_conf             text                  DEFAULT NULL,
    misfire_strategy          varchar(50)  NOT NULL DEFAULT 'DO_NOTHING',
    executor_route_strategy   varchar(50)           DEFAULT NULL,
    executor_handler          varchar(255)          DEFAULT NULL,
    executor_param            varchar(512)          DEFAULT NULL,
    executor_block_strategy   varchar(50)           DEFAULT NULL,
    executor_timeout          integer      NOT NULL DEFAULT '0',
    executor_fail_retry_count integer      NOT NULL DEFAULT '0',
    glue_type                 varchar(50)  NOT NULL,
    glue_source               text,
    glue_remark               varchar(128)          DEFAULT NULL,
    glue_updatetime           timestamp             DEFAULT NULL,
    child_jobid               varchar(255)          DEFAULT NULL,
    trigger_status            smallint     NOT NULL DEFAULT '0',
    trigger_last_time         bigint       NOT NULL DEFAULT '0',
    trigger_next_time         bigint       NOT NULL DEFAULT '0'
);

comment on table xxl_job_info is '任务信息表';
comment on column xxl_job_info.id is '主键';
comment on column xxl_job_info.job_group is '执行器主键ID';
comment on column xxl_job_info.job_desc is '任务描述';
comment on column xxl_job_info.add_time is '任务创建时间';
comment on column xxl_job_info.update_time is '任务更新时间';
comment on column xxl_job_info.author is '作者';
comment on column xxl_job_info.alarm_email is '报警邮件';
comment on column xxl_job_info.schedule_type is '调度类型';
comment on column xxl_job_info.schedule_conf is '调度配置，值含义取决于调度类型';
comment on column xxl_job_info.misfire_strategy is '调度过期策略';
comment on column xxl_job_info.executor_route_strategy is '执行器路由策略';
comment on column xxl_job_info.executor_handler is '执行器任务handler';
comment on column xxl_job_info.executor_param is '执行器任务参数';
comment on column xxl_job_info.executor_block_strategy is '阻塞处理策略';
comment on column xxl_job_info.executor_timeout is '任务执行超时时间，单位秒';
comment on column xxl_job_info.executor_fail_retry_count is '失败重试次数';
comment on column xxl_job_info.glue_type is 'GLUE类型';
comment on column xxl_job_info.glue_source is 'GLUE源代码';
comment on column xxl_job_info.glue_remark is 'GLUE备注';
comment on column xxl_job_info.glue_updatetime is 'GLUE更新时间';
comment on column xxl_job_info.child_jobid is '子任务ID，多个逗号分隔';
comment on column xxl_job_info.trigger_status is '调度状态：0-停止，1-运行';
comment on column xxl_job_info.trigger_last_time is '上次调度时间';
comment on column xxl_job_info.trigger_next_time is '下次调度时间';


CREATE TABLE xxl_job_log
(
    id                        serial
        primary key,
    job_group                 integer  NOT NULL,
    job_id                    integer  NOT NULL,
    executor_address          varchar(255)      DEFAULT NULL,
    executor_handler          varchar(255)      DEFAULT NULL,
    executor_param            text,
    executor_sharding_param   varchar(20)       DEFAULT NULL,
    executor_fail_retry_count integer  NOT NULL DEFAULT '0',
    trigger_time              timestamp         DEFAULT NULL,
    trigger_code              integer  NOT NULL,
    trigger_msg               text,
    handle_time               timestamp         DEFAULT NULL,
    handle_code               integer  NOT NULL,
    handle_msg                text,
    alarm_status              smallint NOT NULL DEFAULT '0'
);

CREATE INDEX I_trigger_time ON xxl_job_log (trigger_time);
CREATE INDEX I_handle_code ON xxl_job_log (handle_code);
comment on table xxl_job_log is '任务日志表';
comment on column xxl_job_log.id is '主键';
comment on column xxl_job_log.job_group is '执行器主键ID';
comment on column xxl_job_log.job_id is '任务，主键ID';
comment on column xxl_job_log.executor_address is '执行器地址，本次执行的地址';
comment on column xxl_job_log.executor_handler is '执行器任务handler';
comment on column xxl_job_log.executor_param is '执行器任务参数';
comment on column xxl_job_log.executor_sharding_param is '执行器任务分片参数，格式如 1/2';
comment on column xxl_job_log.executor_fail_retry_count is '失败重试次数';
comment on column xxl_job_log.trigger_time is '调度-时间';
comment on column xxl_job_log.trigger_code is '调度-结果';
comment on column xxl_job_log.trigger_msg is '调度-日志';
comment on column xxl_job_log.handle_time is '执行-时间';
comment on column xxl_job_log.handle_code is '执行-状态';
comment on column xxl_job_log.handle_msg is '执行-日志';
comment on column xxl_job_log.alarm_status is '告警状态：0-默认、1-无需告警、2-告警成功、3-告警失败';


create or replace function upd_timestamp() returns trigger as
$$
begin
    new.update_time = current_timestamp;
    return new;
end
$$
    language plpgsql;


CREATE TABLE xxl_job_log_report
(
    id            serial
        primary key,
    trigger_day   timestamp        DEFAULT NULL,
    running_count integer NOT NULL DEFAULT '0',
    suc_count     integer NOT NULL DEFAULT '0',
    fail_count    integer NOT NULL DEFAULT '0',
    update_time   timestamp        DEFAULT NULL
);

CREATE UNIQUE INDEX i_trigger_day ON xxl_job_log_report (trigger_day);
comment on column xxl_job_log_report.id is '主键';
comment on column xxl_job_log_report.trigger_day is '调度-时间';
comment on column xxl_job_log_report.running_count is '运行中-日志数量';
comment on column xxl_job_log_report.suc_count is '执行成功-日志数量';
comment on column xxl_job_log_report.fail_count is '执行失败-日志数量';
comment on column xxl_job_log_report.update_time is '更新时间';


CREATE TABLE xxl_job_logglue
(
    id          serial
        primary key,
    job_id      integer      NOT NULL,
    glue_type   varchar(50) DEFAULT NULL,
    glue_source text,
    glue_remark varchar(128) NOT NULL,
    add_time    timestamp   DEFAULT NULL,
    update_time timestamp   DEFAULT NULL
);

create trigger t_xxl_job_logglue_update_time
    before update
    on xxl_job_logglue
    for each row
execute procedure upd_timestamp();
comment on table xxl_job_logglue is '任务GLUE日志表';
comment on column xxl_job_logglue.id is '主键';
comment on column xxl_job_logglue.job_id is '任务，主键ID';
comment on column xxl_job_logglue.glue_type is 'GLUE类型';
comment on column xxl_job_logglue.glue_source is 'GLUE源代码';
comment on column xxl_job_logglue.glue_remark is 'GLUE备注';
comment on column xxl_job_logglue.add_time is '创建时间';
comment on column xxl_job_logglue.update_time is '修改时间';



CREATE TABLE xxl_job_registry
(
    id             serial
        primary key,
    registry_group varchar(50)  NOT NULL,
    registry_key   varchar(255) NOT NULL,
    registry_value varchar(255) NOT NULL,
    update_time    timestamp DEFAULT NULL
);
CREATE INDEX i_g_k_v ON xxl_job_registry (registry_group, registry_key, registry_value);
comment on table xxl_job_registry is '任务注册表';
comment on column xxl_job_registry.id is '主键';
comment on column xxl_job_registry.registry_group is '注册分组';
comment on column xxl_job_registry.registry_key is '注册键';
comment on column xxl_job_registry.registry_value is '注册值';
comment on column xxl_job_registry.update_time is '更新时间';


CREATE TABLE xxl_job_group
(
    id           serial
        primary key,
    app_name     varchar(64) NOT NULL,
    title        varchar(32) NOT NULL,
    address_type smallint    NOT NULL DEFAULT '0',
    address_list text,
    update_time  timestamp            DEFAULT NULL
);

comment on table xxl_job_group is '任务分组表';
comment on column xxl_job_group.id is '主键';
comment on column xxl_job_group.app_name is '执行器AppName';
comment on column xxl_job_group.title is '执行器名称';
comment on column xxl_job_group.address_type is '执行器地址类型：0=自动注册、1=手动录入';
comment on column xxl_job_group.address_list is '执行器地址列表，多地址逗号分隔';


CREATE TABLE xxl_job_user
(
    id         serial
        primary key,
    username   varchar(50) NOT NULL,
    password   varchar(50) NOT NULL,
    role       smallint    NOT NULL,
    permission varchar(255) DEFAULT NULL
);


CREATE UNIQUE INDEX i_username ON xxl_job_user (username);
comment on table xxl_job_user is '任务用户表';
comment on column xxl_job_user.id is '主键';
comment on column xxl_job_user.username is '账号';
comment on column xxl_job_user.password is '密码';
comment on column xxl_job_user.role is '角色：0-普通用户、1-管理员';
comment on column xxl_job_user.permission is '权限：执行器ID列表，多个逗号分割';


CREATE TABLE xxl_job_lock
(
    lock_name varchar(50) NOT NULL,
    PRIMARY KEY (lock_name)
);

comment on table xxl_job_lock is '任务锁表';
comment on column xxl_job_lock.lock_name is '锁名称';



INSERT INTO xxl_job_group
VALUES (1, 'data-engine-syncTask-executor', '数据集成引擎离线任务执行器', 0, NULL, '2022-04-13 17:54:23');
INSERT INTO xxl_job_group
VALUES (2, 'data-engine-systemTask-executor', '数据集成引擎系统任务执行器', 1, NULL, '2022-04-13 17:54:23');

INSERT INTO xxl_job_user (id, username, password, role, permission)
VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
INSERT INTO xxl_job_lock (lock_name)
VALUES ('schedule_lock');


INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (1, 2, '元数据同步到虎符', '2022-04-13 15:32:52', '2022-04-13 17:05:33', 'zigui', '', 'CRON', '0 0 0/1 * * ?',
        'DO_NOTHING', 'FAILOVER', 'SyncTblInfoToHufuTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
        '2022-04-13 15:32:52', '', 1, 1656037800000, 1656038100000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (2, 2, '空间信息同步到缓存', '2022-04-13 15:35:30', '2022-04-13 15:35:30', 'zigui', '', 'CRON', '0 0/5 * * * ?',
        'DO_NOTHING', 'FIRST', 'SyncTblSizeToRedisTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
        '2022-04-13 15:35:30', '', 1, 1656037800000, 1656038100000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (3, 2, '数据源状态同步任务', '2022-04-13 15:38:19', '2022-06-21 10:16:56', 'fuchen', '', 'CRON', '0 0 0/1 * * ?',
        'DO_NOTHING', 'FAILOVER', 'dataSourceCheckJobHandler', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
        'GLUE代码初始化', '2022-04-13 15:38:19', '', 1, 1656036000000, 1656039600000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (4, 2, '清除虎符空文件夹', '2022-04-13 17:37:21', '2022-04-13 17:37:21', 'jingchen', '', 'CRON', '0 0 0 * * ?',
--         'DO_NOTHING', 'FAILOVER', 'ClearMinioHufuTempFolderTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
--         'GLUE代码初始化', '2022-04-13 17:37:21', '', 1, 1656000000000, 1656086400000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (5, 2, 'bucket规则', '2022-04-13 17:38:52', '2022-06-20 14:16:41', 'jingchen', '', 'CRON', '0 0/1 * * * ?',
--         'DO_NOTHING', 'FAILOVER', 'SyncBucketPolicyToMinioTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
--         'GLUE代码初始化', '2022-04-13 17:38:52', '', 1, 1656037800000, 1656037860000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (6, 2, '同步file权限信息', '2022-04-13 17:39:38', '2022-04-13 17:39:38', 'jingchen', '', 'CRON', '0 0/1 * * * ?',
--         'DO_NOTHING', 'FAILOVER', 'SyncFilePolicyToMinioTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
--         'GLUE代码初始化', '2022-04-13 17:39:38', '', 1, 1656037800000, 1656037860000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (7, 2, '同步bucket中文件和目录信息到数据库', '2022-04-13 17:40:13', '2022-04-13 17:40:13', 'jingchen', '',
--         'CRON', '0 0/1 * * * ?', 'DO_NOTHING', 'FAILOVER', 'SyncMinioObjectToDbTask', '', 'SERIAL_EXECUTION', 0, 0,
--         'BEAN', '', 'GLUE代码初始化', '2022-04-13 17:40:13', '', 1, 1656037800000, 1656037860000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (8, 2, '同步AK对应的用户权限信息', '2022-04-13 17:40:46', '2022-04-13 17:40:46', 'jingchen', '', 'CRON',
--         '0 0/1 * * * ?', 'DO_NOTHING', 'FAILOVER', 'SyncUserPolicyToMinioTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN',
--         '', 'GLUE代码初始化', '2022-04-13 17:40:46', '', 1, 1656037800000, 1656037860000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (9, 2, '定时统计minio存储概览页数据', '2022-04-13 17:41:39', '2022-04-13 17:41:39', 'jingchen', '', 'CRON',
--         '0 0/1 * * * ?', 'DO_NOTHING', 'FAILOVER', 'UnstructuredStatisticsTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN',
--         '', 'GLUE代码初始化', '2022-04-13 17:41:39', '', 1, 1656037800000, 1656037860000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (10, 2, '数据字典任务', '2022-04-13 17:43:58', '2022-04-13 17:43:58', 'jingchen', '', 'CRON', '0 0 0/1 * * ?',
        'DO_NOTHING', 'FAILOVER', 'dictionayMappingTaskForInternalTable', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
        'GLUE代码初始化', '2022-04-13 17:43:58', '', 1, 1656036000000, 1656039600000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (11, 2, '存储状态任务', '2022-04-13 17:51:38', '2022-04-13 17:51:38', 'fuchen', '', 'CRON', '0 0/5 * * * ?',
        'DO_NOTHING', 'FAILOVER', 'storageCheckStatusTaskHandler', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
        'GLUE代码初始化', '2022-04-13 17:51:38', '', 1, 1656037800000, 1656038100000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (12, 2, '根据生命周期删除表', '2022-05-24 13:50:42', '2022-05-24 14:11:16', 'zigui', '', 'CRON', '0 1 5 * * ?',
        'DO_NOTHING', 'ROUND', 'DropTblByLifecycleTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
        '2022-05-24 13:50:42', '', 1, 1656018060000, 1656104460000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (13, 2, 'api数据', '2022-06-01 16:02:31', '2022-06-21 10:22:24', '浮尘', '无', 'CRON', '0 0/5 * * * ?',
        'DO_NOTHING', 'FIRST', 'statisticsDataApi', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
        '2022-06-01 16:02:31', '', 1, 1656037800000, 1656038100000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (14, 2, '数据集成告警配置', '2022-06-10 16:10:14', '2022-06-21 10:21:20', 'fuchen', '', 'CRON', '0 0/1 * * * ?',
--         'DO_NOTHING', 'FIRST', 'offlineSyncAlarmTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-06-10 16:10:14', '', 1, 1656037800000, 1656037860000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (15, 2, '实时任务告警配置', '2022-06-10 16:11:04', '2022-06-21 10:21:42', 'fuchen', '', 'CRON', '0 0/1 * * * ?',
--         'DO_NOTHING', 'FIRST', 'onlineSyncAlarmTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-06-10 16:11:04', '', 1, 1656037800000, 1656037860000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (16, 2, '接口采集告警配置', '2022-06-10 16:11:37', '2022-06-21 10:21:59', 'fuchen', '', 'CRON', '0 0/5 * * * ?',
--         'DO_NOTHING', 'FIRST', 'apiSyncAlarmTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-06-10 16:11:37', '', 1, 1656037800000, 1656038100000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (17, 2, '数据质量报警记录', '2022-06-21 10:19:33', '2022-06-24 11:09:32', 'tinglan', '', 'CRON', '0 0/1 * * * ?',
--         'DO_NOTHING', 'FIRST', 'dataQualityAlarmTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-06-21 10:19:33', '', 1, 1656037830000, 1656040200000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (18, 2, '工作流报警任务', '2022-06-21 10:20:46', '2022-06-21 10:26:48', 'fuchen', '', 'CRON', '0 0/1 * * * ?',
--         'DO_NOTHING', 'FIRST', 'taskFlowAlarmTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-06-21 10:20:46', '', 1, 1656037800000, 1656037860000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (19, 2, '离线开发SQL提示', '2022-06-21 10:26:33', '2022-06-21 10:26:51', 'fuchen', '', 'CRON', '0 0 0/1 * * ?',
        'DO_NOTHING', 'FIRST', 'sqlKeywordLeader', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
        '2022-06-21 10:26:33', '', 1, 1656036000000, 1656039600000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (20, 2, '数据标准-外部', '2022-06-21 18:27:21', '2022-06-21 18:31:02', 'admin', '', 'CRON', '0 0 0/1 * * ? ',
        'DO_NOTHING', 'FIRST', 'dictionayMappingTaskForExternalTable', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
        'GLUE代码初始化', '2022-06-21 18:27:21', '', 1, 1656036000000, 1656039600000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (21, 2, '分类统计数据质量异常数', '2022-06-24 11:13:20', '2022-06-24 11:13:20', 'tinglan', '', 'CRON',
        '0 0 0/1 * * ?', 'DO_NOTHING', 'FIRST', 'statisticsException', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
        'GLUE代码初始化', '2022-06-24 11:13:20', '', 1, 0, 0);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (22, 2, '统计表数、字段数信息', '2022-06-24 11:14:10', '2022-06-24 11:14:17', 'tinglan', '', 'CRON',
     '0 0 0/1 * * ?', 'DO_NOTHING', 'FIRST', 'statisticsMonitor', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
     'GLUE代码初始化', '2022-06-24 11:14:10', '', 1, 0, 1656043200000);
INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
                          schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
                          executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
                          glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
                          trigger_next_time)
VALUES (23, 2, '统计表的异常数 ', '2022-06-24 11:14:43', '2022-06-24 11:14:48', 'tinglan', '', 'CRON', '0 0 0/1 * * ?',
     'DO_NOTHING', 'FIRST', 'statisticsTableException', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
     '2022-06-24 11:14:43', '', 1, 0, 1656043200000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (24, 2, '定时启动kes', '2022-06-24 11:17:24', '2022-06-24 11:17:24', 'jingchen', '', 'CRON', '0 0/30 * * * ?',
--         'DO_NOTHING', 'FIRST', 'minioServerMonitorTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-06-24 11:17:24', '', 0, 0, 0);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (25, 2, '删除非本月数据', '2022-06-24 11:20:44', '2022-06-24 11:20:44', 'jinchen', '', 'CRON', '0 0 1 * * ?',
--         'DO_NOTHING', 'FIRST', 'deleteOutdatedStatistics', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-06-24 11:20:44', '', 0, 0, 0);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (26, 2, '更新数据地图', '2022-07-01 12:37:10', '2022-07-01 15:49:52', '子规', '', 'CRON', '0 0 0/1 * * ? *',
--         'DO_NOTHING', 'ROUND', 'DataMapUpdateTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-07-01 12:37:10', '', 1, 1656662400000, 1656666000000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (27, 2, '主数据同步', '2022-04-13 17:43:58', '2022-04-13 17:43:58', 'changkong', '', 'CRON', '0/30 * * * * ?',
--         'DO_NOTHING', 'FIRST', 'mdmSyncTblTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化',
--         '2022-04-13 17:43:58', '', 0, 1656036000000, 1656039600000);
-- INSERT INTO xxl_job_info (id, job_group, job_desc, add_time, update_time, author, alarm_email, schedule_type,
--                           schedule_conf, misfire_strategy, executor_route_strategy, executor_handler, executor_param,
--                           executor_block_strategy, executor_timeout, executor_fail_retry_count, glue_type, glue_source,
--                           glue_remark, glue_updatetime, child_jobid, trigger_status, trigger_last_time,
--                           trigger_next_time)
-- VALUES (28, 2, '主数据同步后数据校验', '2022-04-13 17:43:58', '2022-04-13 17:43:58', 'changkong', '', 'CRON',
--         '0/15 * * * * ?', 'DO_NOTHING', 'FIRST', 'mdmDataCheckTask', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '',
--         'GLUE代码初始化', '2022-04-13 17:43:58', '', 0, 1656036000000, 1656039600000);

select setval('xxl_job_info_id_seq', (select max(id) from xxl_job_info) + 1);